package com.example.imtoken.core.binding

import android.view.View
import androidx.databinding.BindingAdapter

object ViewShowIsHideBindingAdapter {

    @JvmStatic
    @BindingAdapter("isINVISIBLE")
    fun isShowOrINVISIBLE(view: View, isShow: Boolean) {
        if (isShow) {
            view.visibility = View.VISIBLE
        } else {
            view.visibility = View.INVISIBLE
        }
    }

    @JvmStatic
    @BindingAdapter("isGONE")
    fun isShowOrGONE(view: View, isShow: Boolean) {
        if (isShow) {
            view.visibility = View.VISIBLE
        } else {
            view.visibility = View.GONE
        }
    }

}